package com.tc.vms.utils;

/**
 * Created by yonghua.zhang on 2015/12/11.
 */
public final class VmsDomainAttr {
    final String belongDomain;
    final String belongAppname;

    public VmsDomainAttr(String belongDomain, String belongAppname) {
        this.belongDomain = belongDomain;
        this.belongAppname = belongAppname;
    }

    public String getBelongDomain() {
        return belongDomain;
    }

    public String getBelongAppname() {
        return belongAppname;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VmsDomainAttr that = (VmsDomainAttr) o;

        if (belongDomain != null ? !belongDomain.equals(that.belongDomain) : that.belongDomain != null)
            return false;
        return !(belongAppname != null ? !belongAppname.equals(that.belongAppname) : that.belongAppname != null);

    }

    @Override
    public int hashCode() {
        int result = belongDomain != null ? belongDomain.hashCode() : 0;
        result = 31 * result + (belongAppname != null ? belongAppname.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "VmsDomainAttr{" +
                "domain='" + belongDomain + '\'' +
                ", appname='" + belongAppname + '\'' +
                '}';
    }
}
